Skip to content

Set up testing config#82

Merged
jamesrweb merged 14 commits intoP5-wrapper:masterfrom
yevdyko:test/setup-testing-config
May 14, 2021
Merged

Set up testing config#82
jamesrweb merged 14 commits intoP5-wrapper:masterfrom
yevdyko:test/setup-testing-config

Conversation

@yevdyko
Copy link
Contributor

@yevdyko yevdyko commented Apr 10, 2021

This PR sets up a testing config incl. the initial render test and fixes the failed CI.

What was changed?

  • Add jest and react testing libraries.
  • Add jest config and script for running tests failed in CI.
  • Add sketch fixture.
  • Add initial render test.
  • Add canvas as a dev dependency.
  • Add names to jobs in Github actions.
  • Fix fetching the repo from the forked branch.
  • Run format and auto-correct steps only on push events.

@jamesrweb I think we can do proper testing in the next PRs and leave only a configuration here.

@jamesrweb jamesrweb self-requested a review April 10, 2021 12:05
@jamesrweb jamesrweb added dependencies Pull requests that update a dependency file enhancement labels Apr 10, 2021
Copy link
Member

@jamesrweb jamesrweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I would add at least a render test to be sure it renders properly and is Snapshot-able. Also the linter seems to be failing and cannot be auto fixed, can you look into that?

@yevdyko
Copy link
Contributor Author

yevdyko commented Apr 10, 2021

Also the linter seems to be failing and cannot be auto fixed, can you look into that?

Yeah, I see, but it looks like something went wrong on the Github side as it failed on the first step based on the error:

The process '/usr/bin/git' failed with exit code 1

I hope this goes away after restarting CI, but I can't find a manual re-run action so let's see if it works after adding a new commit with a render test.

@yevdyko yevdyko requested a review from jamesrweb May 13, 2021 20:46
@jamesrweb jamesrweb merged commit 52cf5b3 into P5-wrapper:master May 14, 2021
@yevdyko yevdyko deleted the test/setup-testing-config branch May 14, 2021 08:23
jamesrweb added a commit that referenced this pull request Aug 15, 2022
* Add jest and react testing library

* Add jest config

* Add first test sample

* Fix fetching the repo from the fork branch

* Add names to jobs in github actions

* Add sketch fixture

* Render P5Wrapper component in test

* Adding initial render test

* Undo dependencies update

* Add canvas as dev dependency

* Format last changes

* Remove unused value

* Use head_ref for git-auto-commit action

* Run format and auto-correct steps only on push event

Co-authored-by: James Robb <47126579+jamesrweb@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants